package com.oocl.euc.core.requestform.model;

import com.oocl.euc.audit.AuditEntity;
import com.oocl.euc.core.attachment.model.Attachment;

import javax.persistence.*;

@Entity
@Table(name = "PCRS_REQUEST_REMARKS_ATTACH")
@SequenceGenerator(name = "SEQUENCE_GENERATOR", sequenceName = "REQUEST_REMARKS_ATTACH_SEQ", allocationSize = 1)
public class RequestRemarksAttach extends AuditEntity {

    @Column(name = "REMARKS_ID")
    private Long remarkId;


    @OneToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
    @JoinColumn(name = "ATTACHMENT_ID", referencedColumnName = "ID")
    private Attachment attachment;

    public Attachment getAttachment() {
        return attachment;
    }

    public void setAttachment(Attachment attachment) {
        this.attachment = attachment;
    }

    public Long getRemarkId() {
        return remarkId;
    }

    public void setRemarkId(Long remarkId) {
        this.remarkId = remarkId;
    }
}
